<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ include file="/WEB-INF/jspf/taglibs.jspf"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<div class="p-h-md p-v bg-white box-shadow pos-rlt ng-scope">
  <h3 class="no-margin">广告统计</h3>
</div>
<div class="p-md ng-scope">
<ul class="nav nav-tabs" >
        <li >
          <a href="/reports">整体统计</a>
        </li>
        <li>
          <a href="/reports/campaigns" >计划统计</a>
        </li>
        <li class="active">
          <a href="javascript:void(0)" >广告统计</a>
        </li>
      </ul>
      <div class="p b-a no-b-t bg-white m-b">
	  <table id="rptAdsTable" class="table table-bordered table-hover bg-white">
	     <thead>
	        <tr>
	          <th>时间</th>
	          <th>广告名称</th>
	          <th>曝光量</th>
	          <th>点击量</th>
	          <th>点击率</th>
	          <th>平均点击费用</th>
	          <th>千次展示费用</th>
	          <th>花费</th>
	        </tr>
	      </thead>
	      <tbody>
	       <colgroup><col width="12%">
	        <col>
	        <col width="10%">
	        <col width="10%">
	        <col width="10%">
	        <col width="12%">
	        <col width="12%">
	        <col width="10%">
	        </colgroup>
	        </tbody>
	        <c:if test="${!empty form.adgroupRpts}">
	        <c:forEach items="${form.adgroupRpts }" varStatus="i" var="rpt">
	        <tr>
	          <td>
	             <fmt:formatDate value="${rpt['rpt_date'] }" pattern="yyyy-MM-dd"/>
	          </td>
	          <td>
	          	${rpt["aname"] }
	          </td>
	          <td>
	            ${rpt["view_count"] }
	          </td>
	          <td>
	             ${rpt["click_count"] }
	          </td>
	          <td><fmt:formatNumber value="${rpt['ctr'] }" maxFractionDigits="3" />%</td>
	          <td>￥<fmt:formatNumber value="${rpt['avgClickCost']}" maxFractionDigits="3" /></td>
	          <td>￥<fmt:formatNumber value="${rpt['viewCost']}" maxFractionDigits="3" /></td>
	          <td>￥<fmt:formatNumber value="${rpt['cost'] }"  maxFractionDigits="3" /></td>
	        </tr>
	        </c:forEach>
        </c:if>
	    </table>
      </div>
</div>
</body>
</html>